package com.trade.wzj.dao.xiang;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.trade.wzj.model.xiang.ClientOrderinfoDetails;
import com.trade.wzj.model.xiang.CompanyPurchaseDetails;
import com.trade.wzj.model.xiang.CompanyPurchaseInfo;

public interface ClientOrderinfoDetailsDao {
	/**
	 * 客户订单详情添加
	 * @param clientorderinfodetails
	 * @return
	 */
	public int ClientOrderinfoDetailsAdd(@Param("list")List<ClientOrderinfoDetails> list);
	
	/**
	 * 通过客户订单编号查询客户订单详情
	 * @param clientQuotaID客户订单编号
	 * @param productName产品名称
	 * @return
	 */
	public List<ClientOrderinfoDetails> getClientOrderDetail(@Param("clientQuotaID")Integer clientQuotaID,@Param("productName")String productName);
	
	/**
	 * 生成公司采购单信息
	 * @param clientQuotaID
	 * @return
	 */
	public List<ClientOrderinfoDetails> getCompanyOrderMethod(@Param("list")Integer[] list);
	
	/**
	 * 添加公司采购单内容
	 * @param companyInfo
	 */
	public void addCompanyPurchaseInfo(CompanyPurchaseInfo companyInfo);
		
	/**
	 * 添加剂公司采购单详情内容
	 * @param list 采购内容集合
	 */
	public void addCompanyPurchaseDetail(@Param("list")List<CompanyPurchaseDetails> list);
	
	/**
	 * 通过采购编号可查询公司采购信息
	 * @param purchaseNo   采购编号
	 * @return
	 */
	public List<CompanyPurchaseInfo> getAllCompanyPurchaseInfo(@Param("purchaseNo")String purchaseNo);
	
	/**
	 * 根据采购编号和供应商编号查询采购详情信息
	 * @param companyPurchaseInfoID
	 * @param DetailsupplierId
	 * @param productName
	 * @return
	 */
	public List<CompanyPurchaseDetails> getAllCompanyPurchaseInfos(@Param("companyPurchaseInfoID")Integer companyPurchaseInfoID,@Param("DetailsupplierId")Integer DetailsupplierId,@Param("productName")String productName);
	
	/**
	 * 根据公司采购id和供应商id查询相应的公司采购编号和采购日期
	 * @param id		采购id
	 * @param supplierId	供应商id
	 * @return
	 */
	public CompanyPurchaseInfo getCompanyPurchaseId(@Param("id")Integer id,@Param("supplierId")Integer supplierId);
}
